//2009/08/24 16:17:58
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class WhiteCells
{
public:
    int countOccupied(vector <string> board)
    {
        int ret = 0;
        for (int i=0; i<board.size(); i++)
            for (int j=0; j<board[i].size(); j++)
                if (board[i][j] == 'F' && (i+j) %2 ==0)
                    ret ++;
        return ret;
    }
};
